package ink.xiaobaibai.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ink.xiaobaibai.entity.FreeOzoneDevice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-07-20
 */
public interface FreeOzoneDeviceDao extends BaseMapper<FreeOzoneDevice> {

    @Select("SELECT device_code FROM free_oxygen_device WHERE id = (SELECT oxygen_id FROM free_ozone_device WHERE device_code = #{deviceCode})")
    public String getOxygenCodeByDeviceCode(@Param("deviceCode") String deviceCode);
}
